package Demo2;

/**
 * @Author YuanYuan
 * @Date 2022/5/17
 * @Time 12:14
 */

interface  Ishape {

    public static final int a = 1;
    public int b = 2;
    static int c = 3;
    final int d = 4;
    int e = 5;

    public abstract void draw();

    public default void draw4() {
        System.out.println("默认方法");
    }

    public static void draw5() {
        System.out.println("静态方法");
    }

}

class Dog implements Ishape{

    @Override
    public void draw() {
        System.out.println("一只修狗：🐕");
    }
}
class Pig implements Ishape{

    @Override
    public void draw() {
        System.out.println("一只修猪：🐖");
    }
}
class Cat implements Ishape{

    @Override
    public void draw() {
        System.out.println("一只修喵：🐱");
    }
}
public class Test {
    public static void draw(Ishape ishape) {
        ishape.draw();
    }
    public static void main(String[] args) {
        draw(new Dog());
        draw(new Pig());
        draw(new Cat());
    }
}
